<template>
  <el-dialog
      :title="title"
      custom-class="small-dialog"
      :visible="visible"
      append-to-body
      @open="open"
      @close="close"
  >
    <div class="search-pannel">
      <el-form
          class="search-form"
          :model="postData"
          :rules="postRules"
          ref="postForm"
      >
        <el-row>
          <el-col :span="24">
            <el-form-item label="特点名称" prop="name">
              <el-input v-model="postData.name" placeholder="请输入特点名称" maxlength="20" show-word-limit></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <div slot="footer">
      <el-button @click="close">取 消</el-button>
      <el-button type="primary" @click="submit">确 定</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { _post, _put, _getDetail } from '../src/store'
import { getAllArea, postDialog } from '@/mixins'

export default {
  name: 'postDialog',
  mixins: [postDialog, getAllArea],
  data() {
    return {
      postData: {
        name: ''
      },
      postRules: {
        name: [{ required: true, message: '请输入特点名称', trigger: 'blur' }]
      },
      addFunc: _post,
      editFunc: _put,
      detailFunc: _getDetail
    }
  }
}
</script>

<style scoped>

</style>
